<?php 
class Application_Form_Candidat  extends Twitter_Bootstrap_Form_Horizontal
{
	 


	public function init()
	{
		$this->setMethod("post");
		
		$decorators=array(
    			array('ViewHelper', array('tag'   => 'div', "class"=>"controls")),
    			array('Label' , array(  "class"=>"control-label")),
    			'Errors',
    			new Zend_Form_Decorator_HtmlTag(array(
    					'tag'   => 'div', "class"=>"control-group"
    			))
    	);
		 
		$translate = Zend_Registry::get('Zend_Translate');
		$translate->setLocale('fr');
		
		$csv = new Zend_Form_Element_File('csv');
		$csv->setRequired(true)
		->setDestination(APPLICATION_PATH .'/modules/admin/upload');
		$csv->setLabel('Fichier CSV: ');
		$this->setAttrib('csv', 'multipart/form-data');
		$this->addElement($csv);
		
		
		$sendBt = new Zend_Form_Element_Submit('enregistrer');
		$sendBt->setLabel('Enregistrer');
		$sendBt->setAttrib('class', 'btn');
		$this->addElement($sendBt);
		
		$annuler = new Zend_Form_Element_Button('annuler');
		$annuler->setLabel('Annuler');
		$annuler->setAttrib('class', 'btn');
		$this->addElement($annuler);
		
		$sendBt->setDecorators(array('ViewHelper'));
		$annuler->setDecorators(array('ViewHelper'));
		
	}
}
